package action;

import integration.UserDAORemote;

import javax.naming.InitialContext;
import javax.servlet.http.*;

import metier.UserBean;

public class Quitter implements Runnable
{

	HttpSession session;

	public void setSession(HttpSession session) {
		this.session = session ;
	}

	public void run(){

		UserBean ub = (UserBean)session.getAttribute("ub");
		InitialContext context = new InitialContext();
		UserDAORemote uDAO = (UserDAORemote) context.lookup("dao/UserDAO");//dans renvoi UserDAOImpl
		uDAO.insert(ub);

	}
}
